//
//  WPDiseaseInstructionCell.m
//  wobingwoyi
//
//  Created by WGP on 2016/12/1.
//  Copyright © 2016年 WGP. All rights reserved.
//

#import "WPDiseaseInstructionCell.h"

@interface WPDiseaseInstructionCell ()

@property(nonatomic,strong)UILabel *descpLabel;

@end
@implementation WPDiseaseInstructionCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self descpLabel];
        
        UIImageView *bottomLine = [UIImageView lineImageView];
        //        bottomLine.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:bottomLine];
        [bottomLine mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.bottom.equalTo(self.contentView);
            make.height.mas_equalTo(0.5);
        }];
    }
    return self;
}

-(UILabel *)descpLabel
{
    if (_descpLabel == nil)
    {
        _descpLabel = [UILabel new];
        _descpLabel.font = [UIFont systemFontOfSize:14];
        _descpLabel.textColor = RGB_SAME(102);
        _descpLabel.numberOfLines = 0;
        [self.contentView addSubview:_descpLabel];
        
        [_descpLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(10);
            make.right.equalTo(self).offset(-10);
            make.top.equalTo(self.contentView);
            make.bottom.equalTo(self.contentView).offset(-10);
        }];
    }
    return _descpLabel;
}

-(void)setDescpStr:(NSString *)descpStr
{
    _descpStr = descpStr;
    
    self.descpLabel.text = descpStr;
}
@end
